/*
  * desc  :匹配界面
  * author:<zhouzhiwei>
  * @param:
  * date  : 2019/1/28
*/
cc.Class({
    extends: cc.Component,

    properties: {
        left_playerName:cc.Label,
        right_playerName:cc.Label,
        left_coin:cc.Node,
        right_coin:cc.Node,
        left_head:cc.Node,
        right_head:cc.Node,


    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {

    },

    selectBtn(evt) {
        var that = this;
        let _name = evt.currentTarget.name;
        switch (_name) {
            case "down":
                this.node.active=false;
                cc.find("Canvas/game_start/rank").active = true;
                break;

        }
    },
    beautySub(str, len) {
        var reg = /[\u4e00-\u9fa5]/g,    //专业匹配中文
            slice = str.substring(0, len),
            realen = len - (~~(slice.match(reg) && slice.match(reg).length));
        return slice.substring(0, realen ? realen : 1);
    },
    start () {

    },

    // update (dt) {},
});
